package java19_1_8.interface_test;

/**
 * @author yuisama
 * @date 2022/01/08 14:52
 **/
public class Animal implements Cloneable{
    private String name;

    @Override
    protected Animal clone() throws CloneNotSupportedException {
        return (Animal) super.clone();
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Animal animal = new Animal();
        animal.name = "zs";
        Animal animal1 = animal.clone();
        System.out.println(animal == animal1);
        System.out.println(animal1.name);
    }
}